package org.jsbd.boss.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.jsbd.boss.common.DataGridModel;
import org.jsbd.boss.dao.IFlowDataDAO;
import org.jsbd.boss.dao.IFlowStatisticsDAO;
import org.jsbd.boss.domian.channel.FlowChartDto;
import org.jsbd.boss.domian.channel.FlowVo;
import org.jsbd.boss.service.IFlowDataService;
import org.springframework.stereotype.Service;

@Service("flowDataService")
public class FlowDataServiceImpl implements IFlowDataService {
	
	@Resource
	private IFlowDataDAO flowDataDAO;
	@Resource
	private IFlowStatisticsDAO flowStatisticsDAO;

	@Override
	public List<String> selectXAxis(FlowVo flowVo) {
		return flowDataDAO.selectXAxis(flowVo);
	}

	@Override
	public List<FlowChartDto> selectYAxis(FlowVo flowVo) {
		return flowDataDAO.selectYAxis(flowVo);
	}

	@Override
	public String getAvg(FlowVo flowVo) {
		return flowDataDAO.selectAvg(flowVo);
	}

	@Override
	public Map<String, Object> findListGridJson(DataGridModel page, FlowVo flowVo) {
		return flowStatisticsDAO.selectListGridJson(page, flowVo);
	}

	@Override
	public List<String> selectBigFlowXAxis(FlowVo flowVo) {
		return flowDataDAO.selectBigFlowXAxis(flowVo);
	}

	@Override
	public List<Double> selectBigFlowReceiveYAxis(FlowVo flowVo) {
		return flowDataDAO.selectBigFlowReceiveYAxis(flowVo);
	}
	
	@Override
	public List<Double> selectBigFlowSendYAxis(FlowVo flowVo) {
		return flowDataDAO.selectBigFlowSendYAxis(flowVo);
	}

}
